package com.woniu40.petai_user.mapper;

import com.woniu40.petai_user.entity.Attention;
import com.woniu40.petai_user.entity.User;
import com.woniu40.petai_user.vo.UserVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface AttentionMapper {
    int insert(Attention record);
    @Select("SELECT u.* FROM t_attention a, t_user u WHERE a.attention_user_id = u.user_id AND a.user_id = #{value}")
    List<User> selectAllAttionUserByUserid(Integer userId);

    List<Attention> selectAll();

    Attention select(@Param("userId") Integer userId, @Param("attentionUserId") Integer attentionUserId);

    int delete(@Param("userId") Integer userId, @Param("attentionUserId") Integer attentionUserId);
}